<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:s="http://www.suricattus.com.br/jsf/ui"
	xmlns:ec="http://www.b2cexpress.com.br/ecommerce"
	xmlns:sf="http://www.suricattus.com.br/jsf/fn">
	
	<composite:interface componentType="confirmacaoRevendedorComponente">
	
		<composite:attribute name="label" required="true"  />
	
		<composite:attribute name="dlgId" required="true"  />
		
    	<composite:attribute name="action" required="true" method-signature="void action()"/>
    	
	</composite:interface>	
	
	<composite:implementation>
	
		<h:link styleClass="btn btn-primary" onclick="dlg_#{cc.attrs.dlgId}.show()">
			<h:outputText value="#{cc.attrs.label}" />
		</h:link>
		
		<p:dialog id="#{cc.attrs.dlgId}" header="#{labels['label.confirma.operacao']}" widgetVar="dlg_#{cc.attrs.dlgId}" resizable="false" draggable="true" width="550" height="100" modal="true">
			<h:panelGroup id="#{cc.attrs.dlgId}_group">
				<ec:field id="senhaRevendedorField" fieldId="senhaRevendedor" label="#{labels['label.senha']}" required="true">
					<p:password id="senhaRevendedor" value="#{cc.senha}" required="true" />
				</ec:field>
				
				<div class="form-actions">
					<p:commandButton value="#{labels['botao.confirmar']}" action="#{cc.validarSenha()}" process="@all" styleClass="btn btn-primary" onsuccess="dlg_#{cc.attrs.dlgId}.hide()"/>
				</div>
			</h:panelGroup>
		</p:dialog>		
		
	</composite:implementation>	
	
</html>